package com.webview;

import android.webkit.WebChromeClient;
import android.webkit.WebView;

/**
 * Created by 俊峰 on 2016/10/24.
 */
public class MyWebChromeClient extends WebChromeClient {

    private GetData mGetData;

    public MyWebChromeClient(GetData getData) {
        mGetData = getData;
    }

    @Override
    public void onProgressChanged(WebView view, int newProgress) {
        if (mGetData != null) {
            mGetData.onProgressChanged(view, newProgress);
        }
    }

    @Override
    public void onReceivedTitle(WebView view, String title) {
        if (mGetData != null) {
            mGetData.onReceivedTitle(view, title);
        }
    }

}
